<ul>
	<li class="header">Schedule Management</li>
		<li><a href="schedule.php"><span>Manage Schedule</span></a></li>
		<li><a href="meet_list_sw.php"><span>Find Meets</span></a></li>
	
	<li class="header">Meet Management</li>
		<li><a href="meet_list.php"><span>Manage Meets</span></a></li>
		<li><a href="cm_list.php"><span>Manage Common Meets</span></a></li>
		<li><a href="meet_add.php"><span>Add Meet</span></a></li>
		<li><a href="location_list.php"><span>Manage Locations</span></a></li>
		<li><a href="location_add.php"><span>Add Location</span></a></li>
		<li><a href="doc_add.php"><span>Add Documents</span></a></li>

	<li class="header">Results</li>
		<li><a href="results_list.php"><span>Manage Results</span></a></li>
		<li><a href="results_add_quick.php"><span>Add Results</span></a></li>
		<li><a href="reports.php"><span>View Meet Reports</span></a></li>

	<li class="header">Recent Meets</li>
	
	<?php
	
$forward_menu  = date('m/d/Y', mktime(0, 0, 0, date("m")  , date("d")+20, date("Y")));
$backward_menu  = date('m/d/Y', mktime(0, 0, 0, date("m")  , date("d")-20, date("Y")));

//****************** MEET Select Query  ***************
$query_meet_menu = "SELECT * FROM meet, meet_teams WHERE meet.meet_id = meet_teams.meet_id AND meet.meet_active = 'TRUE' AND meet_teams.team_id='$z_current_team_id' AND meet.meet_date_start BETWEEN '$backward_menu' AND '$forward_menu' ORDER BY meet.meet_date_start desc LIMIT 6 OFFSET 0";
$result_meet_menu = pg_query($connection, $query_meet_menu) or die("Error in query: $query_meet_menu.". pg_last_error($connection));
$rows_meet_menu = pg_num_rows($result_meet_menu);
//********************************************************
for ($row = 0; $row < pg_numrows($result_meet_menu); $row++)
			{
			$in_meet_name   = pg_result($result_meet_menu, $row, 1);
			$in_meet_season = pg_result($result_meet_menu, $row, 4);
			$in_meet_date	= pg_result($result_meet_menu, $row, 2);
			$in_meet_id		= pg_result($result_meet_menu, $row, 0);

			$meet_menu_date = date('m/d/Y',(strtotime($in_meet_date)));
			
		$edit_link = "<a href ='meet_edit.php?id=".$in_meet_id."'><span>$in_meet_name | $meet_menu_date</span></a>";
		echo "<li>$edit_link</li>";

			}
			?>

    	<li><a href="meet_list.php"><span><i>All Meets</i></span></a></li>
															
</ul>